<!doctype html>
<html lang="en">
  <head>
  	<title>Free Speech Codec (Speex)</title>

	<meta name="description" content="Speex codec in Javascript">
    <meta name="author" content="Joao Martins">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <link rel="stylesheet" href="public/css/style.css">
  </head>
  <body>
    <div class="wrapper">
      <header>
        <h1>speex.js</h1>
        <p>A Free Codec For Free Speech</p>
        <p class="view"><a href="http://github.com/jpemartins/speex.js">View the Project on GitHub <small>jpemartins/speex.js</small></a></p>
        <ul>
          <li><a href="https://github.com/jpemartins/speex.js/zipballmus/master">Download <strong>ZIP File</strong></a></li>
          <li><a href="https://github.com/jpemartins/speex.js/tarball/master">Download <strong>TAR Ball</strong></a></li>
          <li><a href="http://github.com/jpemartins/speex.js">Fork On <strong>GitHub</strong></a></li>
        </ul>
      </header>
      <section>
	  	<h2>Samples</h2>
		<p>
			<a href="assets/female.wav">female.wav</a>
		</p>
		<p>
			<a href="assets/wb_male_speex_21.wav">wb_male_speex_21.wav</a>
		</p>
		<p>
			<a href="assets/female.ogg">female.ogg</a><span> (8000 Hz, Narrowband mode, Speex Quality Parameter=8/10)</span>
		</p>
		<p>
			<a href="assets/wb_male_speex_21.ogg">wb_male_speex_21.ogg</a><span> (16000 Hz, Wideband mode, Speex Quality Parameter=8/10)</span>
		</p>

		<h2>Encoding some WAV to OGG</h2>
		<p>
			<span class="bold">Encode (*.wav):</span>
			<input type="file" id="file_wav" name="file_wav" />
		</p>

		<h2>Decoding some OGG to WAV</h2>
		<p>
			<span class="bold">Decode (*.ogg):</span>
			<input type="file" id="file_ogg" name="file_ogg" />
		</p>

		<h2>Test microphone loopback for audio in real-time</h2>
		<p>
			<span class="bold">Microphone (PCM):</span>
			<button id="flash-capture">Capture</button>
		</p>

		<div id="console" class="highlight">
			<pre>
				Encode times (in miliseconds): <span id="etimes"></span>
				Total Encoding time: <span id="etotaltime"></span>
				Decode time (in miliseconds): <span id="dtimes"></span>
				Total Decoding time: <span id="dtotaltime"></span>

				SPX File size (in bytes): <span id="esize"></span>
				PCM File size (in bytes): <span id="dsize"></span>
				Number of samples: <span id="nrsamples"></span>
        	</pre>
	        </div>
      </section>
      <footer>
        <p>This project is maintained by <a href="http://github.com/jpemartins">João Martins</a></p>
        <p><small>Original Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
      </footer>
    </div>
	<script>
	__MediaCaptureUI = {
		stylesheet: "public/css/mediacapture.css"
	  , swf: "public/assets/MediaCapture.swf"
	  , timeout: 500
	}
	</script>

	<!-- Dependencies -->
	<script src="public/js/lib/xaudio.js"></script>
	<script src="public/js/lib/pcmdata.min.js"></script>
	<script src="public/js/lib/swfobject.js"></script>

	<!-- Other Libraries/Polyfills -->
	<script src="public/js/lib/usertiming.js"></script>
	<script src="public/js/lib/bitstring.js"></script>
	<script src="public/js/lib/mediacapture.js"></script>

	<!-- Development
	<script src="src/ogg.js"></script>
	<script src="src/libspeexdsp.js"></script>
	<script src="src/libspeex.js"></script>
	<script src="src/util.js"></script>
	<script src="src/types.js"></script>
	<script src="src/speex.js"></script>
	<script src="src/codec.js"></script>
	<script src="src/decoder.js"></script>
	<script src="src/encoder.js"></script>
  -->

	<!-- Production -->
	<script src="dist/speex.min.js"></script>

	<!-- For input/microphone handling and codec API usage -->
	<script src="public/js/microphone.js"></script>
	<script src="public/js/audio.js"></script>
	<script src="public/js/application.js"></script>
  </body>
</html>
